<?php

namespace app\dao\shop;

use app\dao\BaseDao;
use app\model\Category;
use app\model\Shop;

class ShopDao extends BaseDao
{
    public function getShopAndWxCodeByName($name)
    {
        return $this->getModel()->where('name', '=', $name)->with(['WxCode'])->find();
    }

   public function getIdByName($name)
   {
        return $this->getModel()->where('name', '=', $name)->field('id')->find();
    }

    protected function setModel(): string
    {
        return Shop::class;
    }



}